import http from '@/utils/http'
// 发起登录的请求
export const login = data => {
  return http({
    method: 'POST',
    url: 'v1_0/authorizations',
    data
  })
}

// 发送验证码
export const sendM = data => {
  return http({
    method: 'GET',
    url: 'v1_0/sms/codes/' + data
  })
}

// 获取用户的信息
export const getUserInfo = () => {
  return http({
    method: 'GET',
    url: 'v1_0/user'
  })
}

// 获取用户频道的请求
export const getUserChannels = () => {
  return http({
    method: 'GET',
    url: 'v1_0/user/channels'
  })
}
